<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Main</title>
</h:head>
<style>
.language {
	width: 950px;
	text-align: left;
}

.hi {
	width: 100px;
	text-align: right;
}
</style>
<body>
	<f:view locale="#{language.locale}">
		<center>
			<h:form>
				<h:panelGrid width="1108px">
					<h:graphicImage value="../images/eLeave.jpg" />
					<h:panelGrid width="1108px" columns="2" columnClasses="language,hi">
						<h:panelGroup>
							<h:outputText value="#{msg['chooseLang']}:" />
							<h:selectOneMenu id="lang" value="#{language.lang}">
								<f:selectItem itemLabel="#{msg['en']}" itemValue="en" />
								<f:selectItem itemLabel="#{msg['zh_tw']}" itemValue="zh_tw" />
								<f:selectItem itemLabel="#{msg['zh_cn']}" itemValue="zh_cn" />
								<f:ajax event="change" execute="@form"
									listener="#{language.changeLang}" render="@all"></f:ajax>
							</h:selectOneMenu>
						</h:panelGroup>
						<h:outputText value="#{msg['hi']}, #{userSession.userName}!" />
					</h:panelGrid>
					<h:panelGrid columns="2">
						<iframe name="menu" src="userMenu.xhtml" frameborder="0"
							width="250px" style="height: 500px" id="a" />
						<iframe name="main" frameborder="0" width="840px"
							style="height: 500px" />
					</h:panelGrid>

				</h:panelGrid>
			</h:form>
		</center>
	</f:view>
</body>
</html>

